package com.sg.service.biz.bff.impl;

import cn.hutool.core.bean.BeanUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.service.biz.bff.CycleTypeService;
import com.wicket.okrapp.integration.CycleTypeService;
import com.wicket.okrapp.integration.dto.*;
import com.sg.common.exception.Assert;
import com.wicket.okrframework.integration.InductionRecordService;
import com.wicket.okrframework.integration.dto.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class CycleTypeServiceImpl implements CycleTypeService {

    @Resource
    com.sg.service.biz.app.CycleTypeService fwAppCycleTypeClient;
    @Resource
    com.sg.service.biz.framework.InductionRecordService fwBaseInductionRecordClient;
    @Resource
    private RedisUtil redisUtil;


    /**
     * B3-4查询周期类型实例列表(边界)[2016]
     * gen by moon at 8/10/2022, 3:38:23 AM
     */
    @Trace(operationName = "B3-4查询周期类型实例列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleTypeInstanceListBorderRespDto queryCycleTypeInstanceListBorder(BffQueryCycleTypeInstanceListBorderReqDto reqDto) {


        QueryCycleTypeInstanceListRespDto queryCycleTypeInstanceListRespDto_1 = null;
//步骤0: D3-4查询周期类型实例列表 - queryCycleTypeInstanceList
        QueryCycleTypeInstanceListRespDto queryCycleTypeInstanceListRespDto = null;
        QueryCycleTypeInstanceListReqDto queryCycleTypeInstanceListReqDto = new QueryCycleTypeInstanceListReqDto();
        queryCycleTypeInstanceListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:63229_1
        if (reqDto != null) {
            queryCycleTypeInstanceListReqDto.setCycleTypeId(reqDto.getCycleTypeId());//sourceId:63228_1
        }

        /*D3-4查询周期类型实例列表[1867]   */
        Assert.isNull(queryCycleTypeInstanceListReqDto.getCycleTypeId(), "B3-4查询周期类型实例列表(边界)-D3-4查询周期类型实例列表-周期类型ID不能为空", false);
        Assert.isNull(queryCycleTypeInstanceListReqDto.getSubjectLifeCycle(), "B3-4查询周期类型实例列表(边界)-D3-4查询周期类型实例列表-主体生命周期不能为空", false);
        queryCycleTypeInstanceListRespDto = fwAppCycleTypeClient.queryCycleTypeInstanceList(queryCycleTypeInstanceListReqDto).getData();

        queryCycleTypeInstanceListRespDto_1 = queryCycleTypeInstanceListRespDto;

        BffQueryCycleTypeInstanceListBorderRespDto retData = new BffQueryCycleTypeInstanceListBorderRespDto();
        if (queryCycleTypeInstanceListRespDto_1 != null) {
            retData.setCycleTypeInstanceList(queryCycleTypeInstanceListRespDto_1.getCycleTypeInstanceList().stream().map(item -> BeanUtil.toBean(item, BffCycleTypeInstanceDto.class)).collect(Collectors.toList()));//sourceId:63232_1
        }


        return retData;
    }

    /**
     * B3-4查询周期类型列表(边界)[2015]
     * gen by moon at 10/11/2022, 6:09:21 PM
     */
    @Trace(operationName = "B3-4查询周期类型列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleTypeListBorderRespDto queryCycleTypeListBorder(BffQueryCycleTypeListBorderReqDto reqDto) {


        QueryCycleTypeListRespDto queryCycleTypeListRespDto_1 = null;
//步骤0: D3-4查询周期类型列表 - queryCycleTypeList
        QueryCycleTypeListRespDto queryCycleTypeListRespDto = null;
        QueryCycleTypeListReqDto queryCycleTypeListReqDto = new QueryCycleTypeListReqDto();
        queryCycleTypeListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:63239_1
        if (reqDto != null) {
            queryCycleTypeListReqDto.setCycleTypeStandard(reqDto.getCycleTypeStandard());//SimpleFieldAssign//sourceId:63426_1
        }

        /*D3-4查询周期类型列表[1855]   */
        Assert.isNull(queryCycleTypeListReqDto.getSubjectLifeCycle(), "B3-4查询周期类型列表(边界)-D3-4查询周期类型列表-主体生命周期不能为空", false);
        queryCycleTypeListRespDto = fwAppCycleTypeClient.queryCycleTypeList(queryCycleTypeListReqDto).getData();


        queryCycleTypeListRespDto_1 = queryCycleTypeListRespDto;

        BffQueryCycleTypeListBorderRespDto retData = new BffQueryCycleTypeListBorderRespDto();
        if (queryCycleTypeListRespDto_1 != null) {
            retData.setCycleTypeList(queryCycleTypeListRespDto_1.getCycleTypeList().stream().map(item -> BeanUtil.toBean(item, BffCycleTypeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:63244_1
        }


        return retData;
    }

    /**
     * B3-4查周期列表(边界)[2291]
     * gen by moon at 9/13/2022, 3:43:40 AM
     */
    @Trace(operationName = "B3-4查周期列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleListBorderRespDto queryCycleListBorder(BffQueryCycleListBorderReqDto reqDto) {


        QueryCycleListBorderRespDto queryCycleListBorderRespDto_1 = null;
//步骤0: D3-4查周期列表(边界) - queryCycleListBorder
        QueryCycleListBorderRespDto queryCycleListBorderRespDto = null;
        QueryCycleListBorderReqDto queryCycleListBorderReqDto = new QueryCycleListBorderReqDto();
        if (reqDto != null) {
            queryCycleListBorderReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//sourceId:67460_1
            queryCycleListBorderReqDto.setCycleSystemCode(reqDto.getCycleSystemCode());//sourceId:69439_1
        }

        /*D3-4查周期列表(查年周期列表)[2292]   */
        Assert.isNull(queryCycleListBorderReqDto.getCycleTypeCode(), "B3-4查周期列表(边界)-D3-4查周期列表(查年周期列表)-周期类型标识不能为空", false);
        Assert.isNull(queryCycleListBorderReqDto.getCycleSystemCode(), "B3-4查周期列表(边界)-D3-4查周期列表(查年周期列表)-周期体系类型标识不能为空", false);
        queryCycleListBorderRespDto = fwAppCycleTypeClient.queryCycleListBorder(queryCycleListBorderReqDto).getData();


        queryCycleListBorderRespDto_1 = queryCycleListBorderRespDto;

        BffQueryCycleListBorderRespDto retData = new BffQueryCycleListBorderRespDto();
        if (queryCycleListBorderRespDto_1 != null) {
            retData.setCycleList(queryCycleListBorderRespDto_1.getCycleList().stream().map(item -> BeanUtil.toBean(item, BffCycleDto.class)).collect(Collectors.toList()));//sourceId:67462_1
        }


        return retData;
    }

    /**
     * B3-4查父周期列表(边界)[2294]
     * gen by moon at 10/12/2022, 11:11:23 AM
     */
    @Trace(operationName = "B3-4查父周期列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryFatherCycleListBorderRespDto queryFatherCycleListBorder(BffQueryFatherCycleListBorderReqDto reqDto) {


        QueryCycleListBorderRespDto queryCycleListBorderRespDto_1 = null;
//步骤0: D3-4查周期列表(边界) - queryCycleListBorder
        QueryCycleListBorderRespDto queryCycleListBorderRespDto = null;
        QueryCycleListBorderReqDto queryCycleListBorderReqDto = new QueryCycleListBorderReqDto();
        if (reqDto != null) {
            queryCycleListBorderReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:376307_1
            queryCycleListBorderReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:376308_1
            queryCycleListBorderReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:376309_1
        }

        /*D3-4查周期列表(查父周期列表)[2292]   */
        Assert.isNull(queryCycleListBorderReqDto.getCycleStartTime(), "B3-4查父周期列表(边界)-D3-4查周期列表(查父周期列表)-周期开始时间不能为空", false);
        Assert.isNull(queryCycleListBorderReqDto.getCycleEndTime(), "B3-4查父周期列表(边界)-D3-4查周期列表(查父周期列表)-周期结束时间不能为空", false);
        Assert.isNull(queryCycleListBorderReqDto.getCycleTypeCode(), "B3-4查父周期列表(边界)-D3-4查周期列表(查父周期列表)-周期类型标识不能为空", false);
        queryCycleListBorderRespDto = fwAppCycleTypeClient.queryCycleListBorder(queryCycleListBorderReqDto).getData();


        queryCycleListBorderRespDto_1 = queryCycleListBorderRespDto;

        BffQueryFatherCycleListBorderRespDto retData = new BffQueryFatherCycleListBorderRespDto();
        if (queryCycleListBorderRespDto_1 != null) {
            retData.setCycleList(queryCycleListBorderRespDto_1.getCycleList().stream().map(item -> BeanUtil.toBean(item, BffCycleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:376325_1
        }


        return retData;
    }

    /**
     * B3-4查子周期列表(边界)[2295]
     * gen by moon at 10/12/2022, 11:11:25 AM
     */
    @Trace(operationName = "B3-4查子周期列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQuerySubcycleListBorderRespDto querySubcycleListBorder(BffQuerySubcycleListBorderReqDto reqDto) {


        QueryCycleListBorderRespDto queryCycleListBorderRespDto_1 = null;
//步骤0: D3-4查周期列表(边界) - queryCycleListBorder
        QueryCycleListBorderRespDto queryCycleListBorderRespDto = null;
        QueryCycleListBorderReqDto queryCycleListBorderReqDto = new QueryCycleListBorderReqDto();
        if (reqDto != null) {
            queryCycleListBorderReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:376318_1
            queryCycleListBorderReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:376319_1
            queryCycleListBorderReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:376317_1
        }

        /*D3-4查周期列表(边界)[2292]   */
        Assert.isNull(queryCycleListBorderReqDto.getCycleStartTime(), "B3-4查子周期列表(边界)-D3-4查周期列表(边界)-周期开始时间不能为空", false);
        Assert.isNull(queryCycleListBorderReqDto.getCycleEndTime(), "B3-4查子周期列表(边界)-D3-4查周期列表(边界)-周期结束时间不能为空", false);
        Assert.isNull(queryCycleListBorderReqDto.getCycleTypeCode(), "B3-4查子周期列表(边界)-D3-4查周期列表(边界)-周期类型标识不能为空", false);
        queryCycleListBorderRespDto = fwAppCycleTypeClient.queryCycleListBorder(queryCycleListBorderReqDto).getData();


        queryCycleListBorderRespDto_1 = queryCycleListBorderRespDto;

        BffQuerySubcycleListBorderRespDto retData = new BffQuerySubcycleListBorderRespDto();
        if (queryCycleListBorderRespDto_1 != null) {
            retData.setCycleList(queryCycleListBorderRespDto_1.getCycleList().stream().map(item -> BeanUtil.toBean(item, BffCycleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:376324_1
        }


        return retData;
    }

    /**
     * B3-4查中期周期列表(边界)[2339]
     * gen by moon at 10/2/2022, 11:27:48 PM
     */
    @Trace(operationName = "B3-4查中期周期列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryMidCycleListBorderRespDto queryMidCycleListBorder(BffQueryMidCycleListBorderReqDto reqDto) {


        QueryCycleListBorderRespDto queryCycleListBorderRespDto_1 = null;
//步骤0: D3-4查周期列表(边界) - queryCycleListBorder
        QueryCycleListBorderRespDto queryCycleListBorderRespDto = null;
        QueryCycleListBorderReqDto queryCycleListBorderReqDto = new QueryCycleListBorderReqDto();
        if (reqDto != null) {
            queryCycleListBorderReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:69421_1
            queryCycleListBorderReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:69422_1
            queryCycleListBorderReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:69420_1
            queryCycleListBorderReqDto.setCycleSystemCode(reqDto.getCycleSystemCode());//SimpleFieldAssign//sourceId:69423_1
        }

        /*D3-4查周期列表(中期周期列表）[2292]   */
        Assert.isNull(queryCycleListBorderReqDto.getCycleStartTime(), "B3-4查中期周期列表(边界)-D3-4查周期列表(中期周期列表）-周期开始时间不能为空", false);
        Assert.isNull(queryCycleListBorderReqDto.getCycleEndTime(), "B3-4查中期周期列表(边界)-D3-4查周期列表(中期周期列表）-周期结束时间不能为空", false);
        Assert.isNull(queryCycleListBorderReqDto.getCycleTypeCode(), "B3-4查中期周期列表(边界)-D3-4查周期列表(中期周期列表）-周期类型标识不能为空", false);
        queryCycleListBorderRespDto = fwAppCycleTypeClient.queryCycleListBorder(queryCycleListBorderReqDto).getData();


        queryCycleListBorderRespDto_1 = queryCycleListBorderRespDto;

        BffQueryMidCycleListBorderRespDto retData = new BffQueryMidCycleListBorderRespDto();
        if (queryCycleListBorderRespDto_1 != null) {
            retData.setCycleList(queryCycleListBorderRespDto_1.getCycleList().stream().map(item -> BeanUtil.toBean(item, BffCycleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:69428_1
        }


        return retData;
    }

    /**
     * B3-4查小于年单周期列表(边界)[2340]
     * gen by moon at 10/12/2022, 11:11:26 AM
     */
    @Trace(operationName = "B3-4查小于年单周期列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryLessYearSingleCycleListBorderRespDto queryLessYearSingleCycleListBorder(BffQueryLessYearSingleCycleListBorderReqDto reqDto) {


        QueryCycleListBorderRespDto queryCycleListBorderRespDto_1 = null;
//步骤0: D3-4查周期列表(边界) - queryCycleListBorder
        QueryCycleListBorderRespDto queryCycleListBorderRespDto = null;
        QueryCycleListBorderReqDto queryCycleListBorderReqDto = new QueryCycleListBorderReqDto();
        if (reqDto != null) {
            queryCycleListBorderReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:376327_1
            queryCycleListBorderReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:376328_1
            queryCycleListBorderReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:376329_1
        }

        /*D3-4查周期列表(小于年单周期)[2292]   */
        Assert.isNull(queryCycleListBorderReqDto.getCycleStartTime(), "B3-4查小于年单周期列表(边界)-D3-4查周期列表(小于年单周期)-周期开始时间不能为空", false);
        Assert.isNull(queryCycleListBorderReqDto.getCycleEndTime(), "B3-4查小于年单周期列表(边界)-D3-4查周期列表(小于年单周期)-周期结束时间不能为空", false);
        Assert.isNull(queryCycleListBorderReqDto.getCycleTypeCode(), "B3-4查小于年单周期列表(边界)-D3-4查周期列表(小于年单周期)-周期类型标识不能为空", false);
        queryCycleListBorderRespDto = fwAppCycleTypeClient.queryCycleListBorder(queryCycleListBorderReqDto).getData();


        queryCycleListBorderRespDto_1 = queryCycleListBorderRespDto;

        BffQueryLessYearSingleCycleListBorderRespDto retData = new BffQueryLessYearSingleCycleListBorderRespDto();
        if (queryCycleListBorderRespDto_1 != null) {
            retData.setCycleList(queryCycleListBorderRespDto_1.getCycleList().stream().map(item -> BeanUtil.toBean(item, BffCycleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:376330_1
        }


        return retData;
    }

    /**
     * B3-4查询父子中周期列表(边界)[2339]
     * gen by moon at 10/11/2022, 2:03:34 PM
     */
    @Trace(operationName = "B3-4查询父子中周期列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryParentSonMidCycleListBorderRespDto queryParentSonMidCycleListBorder(BffQueryParentSonMidCycleListBorderReqDto reqDto) {


        QueryParentSonMidCycleListRespDto queryParentSonMidCycleListRespDto_1 = null;
//步骤0: D3-4查询父子中周期列表 - queryParentSonMidCycleList
        QueryParentSonMidCycleListRespDto queryParentSonMidCycleListRespDto = null;
        QueryParentSonMidCycleListReqDto queryParentSonMidCycleListReqDto = new QueryParentSonMidCycleListReqDto();
        if (reqDto != null) {
            queryParentSonMidCycleListReqDto.setCycleList(reqDto.getCycleList());//list-field-assign//sourceId:375831_1
            queryParentSonMidCycleListReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:375832_1
            queryParentSonMidCycleListReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:375833_1
            queryParentSonMidCycleListReqDto.setSubcycleType(reqDto.getSubcycleType());//SimpleFieldAssign//sourceId:375836_1
            queryParentSonMidCycleListReqDto.setFatherCycleType(reqDto.getFatherCycleType());//SimpleFieldAssign//sourceId:375829_1
            queryParentSonMidCycleListReqDto.setMidCycleType(reqDto.getMidCycleType());//SimpleFieldAssign//sourceId:375830_1
            queryParentSonMidCycleListReqDto.setMidSubcycleQuantity(reqDto.getMidSubcycleQuantity());//SimpleFieldAssign//sourceId:375835_1
            queryParentSonMidCycleListReqDto.setOpenMidCycle(reqDto.getOpenMidCycle());//SimpleFieldAssign//sourceId:375828_1
            queryParentSonMidCycleListReqDto.setCycleMode(reqDto.getCycleMode());//SimpleFieldAssign//sourceId:375876_1
            queryParentSonMidCycleListReqDto.setCycleSizeType(reqDto.getCycleSizeType());//SimpleFieldAssign//sourceId:375877_1
        }

        /*D3-4查询父子中周期列表[4825]   */
        Assert.isNull(queryParentSonMidCycleListReqDto.getCycleStartTime(), "B3-4查询父子中周期列表(边界)-D3-4查询父子中周期列表-周期开始时间不能为空", false);
        Assert.isNull(queryParentSonMidCycleListReqDto.getCycleEndTime(), "B3-4查询父子中周期列表(边界)-D3-4查询父子中周期列表-周期结束时间不能为空", false);
        Assert.isNull(queryParentSonMidCycleListReqDto.getFatherCycleType(), "B3-4查询父子中周期列表(边界)-D3-4查询父子中周期列表-父周期周期类型不能为空", false);
        Assert.isNull(queryParentSonMidCycleListReqDto.getOpenMidCycle(), "B3-4查询父子中周期列表(边界)-D3-4查询父子中周期列表-是否开启中期不能为空", false);
        Assert.isNull(queryParentSonMidCycleListReqDto.getCycleMode(), "B3-4查询父子中周期列表(边界)-D3-4查询父子中周期列表-周期模式不能为空", false);
        Assert.isNull(queryParentSonMidCycleListReqDto.getCycleSizeType(), "B3-4查询父子中周期列表(边界)-D3-4查询父子中周期列表-周期大小类型不能为空", false);
        queryParentSonMidCycleListRespDto = fwAppCycleTypeClient.queryParentSonMidCycleList(queryParentSonMidCycleListReqDto).getData();


        queryParentSonMidCycleListRespDto_1 = queryParentSonMidCycleListRespDto;

        BffQueryParentSonMidCycleListBorderRespDto retData = new BffQueryParentSonMidCycleListBorderRespDto();
        if (queryParentSonMidCycleListRespDto_1 != null) {
            retData.setFatherCycleList(queryParentSonMidCycleListRespDto_1.getFatherCycleList().stream().map(item -> BeanUtil.toBean(item, BffFatherCycleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:375870_1
            retData.setSubCycleList(queryParentSonMidCycleListRespDto_1.getSubCycleList().stream().map(item -> BeanUtil.toBean(item, BffSubCycleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:375871_1
            retData.setMidCycleStandardName(queryParentSonMidCycleListRespDto_1.getMidCycleStandardName());//SimpleFieldAssign//sourceId:375872_1
        }


        return retData;
    }

    /**
     * B3-4查询中期周期详情(边界)[4831]
     * gen by moon at 10/19/2022, 10:10:28 PM
     */
    @Trace(operationName = "B3-4查询中期周期详情(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryMidCycleDetailBorderRespDto queryMidCycleDetailBorder(BffQueryMidCycleDetailBorderReqDto reqDto) {


        QueryMidCycleDetailRespDto queryMidCycleDetailRespDto_1 = null;
//步骤0: D3-4查询中期周期详情 - queryMidCycleDetail
        QueryMidCycleDetailRespDto queryMidCycleDetailRespDto = null;
        QueryMidCycleDetailReqDto queryMidCycleDetailReqDto = new QueryMidCycleDetailReqDto();
        if (reqDto != null) {
            queryMidCycleDetailReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:376298_1
            queryMidCycleDetailReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:376299_1
            queryMidCycleDetailReqDto.setMidCycleType(reqDto.getMidCycleType());//SimpleFieldAssign//sourceId:376300_1
        }

        /*D3-4查询中期周期详情[4832]   */
        Assert.isNull(queryMidCycleDetailReqDto.getCycleStartTime(), "B3-4查询中期周期详情(边界)-D3-4查询中期周期详情-周期开始时间不能为空", false);
        Assert.isNull(queryMidCycleDetailReqDto.getCycleEndTime(), "B3-4查询中期周期详情(边界)-D3-4查询中期周期详情-周期结束时间不能为空", false);
        Assert.isNull(queryMidCycleDetailReqDto.getMidCycleType(), "B3-4查询中期周期详情(边界)-D3-4查询中期周期详情-中期周期类型不能为空", false);
        queryMidCycleDetailRespDto = fwAppCycleTypeClient.queryMidCycleDetail(queryMidCycleDetailReqDto).getData();


        queryMidCycleDetailRespDto_1 = queryMidCycleDetailRespDto;

        BffQueryMidCycleDetailBorderRespDto retData = new BffQueryMidCycleDetailBorderRespDto();
        if (queryMidCycleDetailRespDto_1 != null) {
            retData.setCycleStandardName(queryMidCycleDetailRespDto_1.getCycleStandardName());//SimpleFieldAssign//sourceId:376306_1
        }


        return retData;
    }

    /**
     * B3批量查询租户周期(管理)[5285]
     * gen by moon at 2/27/2023, 3:58:06 PM
     */
    @Trace(operationName = "B3批量查询租户周期(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchQueryTenantCycleRespDto batchQueryTenantCycle(BffBatchQueryTenantCycleReqDto reqDto) {


        QueryTenantCycleListRespDto queryTenantCycleListRespDto_1 = null;
//步骤0: D3查询租户周期列表 - queryTenantCycleList
        QueryTenantCycleListRespDto queryTenantCycleListRespDto = null;
        QueryTenantCycleListReqDto queryTenantCycleListReqDto = new QueryTenantCycleListReqDto();
        if (reqDto != null) {
            queryTenantCycleListReqDto.setComTxtField(reqDto.getTenantCycleNavigationValue());//SimpleFieldAssign//sourceId:456926_1
            queryTenantCycleListReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:458999_1
        }

        /*D3查询租户周期列表[5283]   */
        Assert.isNull(queryTenantCycleListReqDto.getComTxtField(), "B3批量查询租户周期(管理)-D3查询租户周期列表-通用文本字段不能为空", false);
        Assert.isNull(queryTenantCycleListReqDto.getSubjectLifeCycle(), "B3批量查询租户周期(管理)-D3查询租户周期列表-主体生命周期不能为空", false);
        queryTenantCycleListRespDto = fwAppCycleTypeClient.queryTenantCycleList(queryTenantCycleListReqDto).getData();


        queryTenantCycleListRespDto_1 = queryTenantCycleListRespDto;

        BffBatchQueryTenantCycleRespDto retData = new BffBatchQueryTenantCycleRespDto();
        if (queryTenantCycleListRespDto_1 != null) {
            retData.setTenantCycleList(queryTenantCycleListRespDto_1.getCycleList().stream().map(item -> BeanUtil.toBean(item, BffTenantCycleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:456822_1
        }


        retData.setPageNum(queryTenantCycleListRespDto.getPageNum());
        retData.setPageSize(queryTenantCycleListRespDto.getPageSize());
        retData.setTotal(queryTenantCycleListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryTenantCycleListRespDto.getTotalNum()) / Double.valueOf(queryTenantCycleListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B3删除租户周期(管理)[5297]
     * gen by moon at 11/26/2022, 6:26:17 PM
     */
    @Trace(operationName = "B3删除租户周期(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffDeleteTenantCycleRespDto deleteTenantCycle(BffDeleteTenantCycleReqDto reqDto) {


        //步骤0: D3删除租户周期 - deleteTenantCycle
        DeleteTenantCycleRespDto deleteTenantCycleRespDto = null;
        DeleteTenantCycleReqDto deleteTenantCycleReqDto = new DeleteTenantCycleReqDto();
        deleteTenantCycleReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:458902_1
        if (reqDto != null) {
            deleteTenantCycleReqDto.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:458901_1
        }

        /*D3删除租户周期[5295]   */
        Assert.isNull(deleteTenantCycleReqDto.getCycleId(), "B3删除租户周期(管理)-D3删除租户周期-周期ID不能为空", false);
        deleteTenantCycleRespDto = fwAppCycleTypeClient.deleteTenantCycle(deleteTenantCycleReqDto).getData();


        BffDeleteTenantCycleRespDto retData = new BffDeleteTenantCycleRespDto();


        return retData;
    }

    /**
     * B3判断租户周期导航(管理)[5301]
     * gen by moon at 5/16/2023, 12:21:12 AM
     */
    @Trace(operationName = "B3判断租户周期导航(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchQueryTenantCycleNavigationRespDto batchQueryTenantCycleNavigation(BffBatchQueryTenantCycleNavigationReqDto reqDto) {


        QueryTenantCycleNavigationListRespDto queryTenantCycleNavigationListRespDto_1 = null;
//步骤0: D3查询租户周期导航列表 - queryTenantCycleNavigationList
        QueryTenantCycleNavigationListRespDto queryTenantCycleNavigationListRespDto = null;
        QueryTenantCycleNavigationListReqDto queryTenantCycleNavigationListReqDto = new QueryTenantCycleNavigationListReqDto();


        /*D3查询租户周期导航列表[5298]   */

        queryTenantCycleNavigationListRespDto = fwAppCycleTypeClient.queryTenantCycleNavigationList(queryTenantCycleNavigationListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryTenantCycleNavigationListRespDto_1 = queryTenantCycleNavigationListRespDto;

        BffBatchQueryTenantCycleNavigationRespDto retData = new BffBatchQueryTenantCycleNavigationRespDto();
        if (queryTenantCycleNavigationListRespDto_1 != null) {
            retData.setCustomField(queryTenantCycleNavigationListRespDto_1.getCustomField());//SimpleFieldAssign//sourceId:944914_1
        }


        return retData;
    }

    /**
     * B3查询租户节假日设置列表(管理)[5315]
     * gen by moon at 11/29/2022, 11:21:30 AM
     */
    @Trace(operationName = "B3查询租户节假日设置列表(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTenantHolidaySetListRespDto queryTenantHolidaySetList(BffQueryTenantHolidaySetListReqDto reqDto) {


        QueryTenantHolidaySetListRespDto queryTenantHolidaySetListRespDto_1 = null;
//步骤0: D3查询租户节假日设置列表 - queryTenantHolidaySetList
        QueryTenantHolidaySetListRespDto queryTenantHolidaySetListRespDto = null;
        QueryTenantHolidaySetListReqDto queryTenantHolidaySetListReqDto = new QueryTenantHolidaySetListReqDto();


        /*D3查询租户节假日设置列表[5314]   */

        queryTenantHolidaySetListRespDto = fwAppCycleTypeClient.queryTenantHolidaySetList(queryTenantHolidaySetListReqDto).getData();


        queryTenantHolidaySetListRespDto_1 = queryTenantHolidaySetListRespDto;

        BffQueryTenantHolidaySetListRespDto retData = new BffQueryTenantHolidaySetListRespDto();
        if (queryTenantHolidaySetListRespDto_1 != null) {
            retData.setTenantHolidaySetList(queryTenantHolidaySetListRespDto_1.getTenantHolidaySetList().stream().map(item -> BeanUtil.toBean(item, BffTenantHolidaySetDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:462848_1
        }


        return retData;
    }

    /**
     * B3查询租户节假日设置详情(管理)[5317]
     * gen by moon at 11/29/2022, 11:21:31 AM
     */
    @Trace(operationName = "B3查询租户节假日设置详情(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTenantHolidaySetDetailRespDto queryTenantHolidaySetDetail(BffQueryTenantHolidaySetDetailReqDto reqDto) {


        QueryTenantHolidaySetDetailRespDto queryTenantHolidaySetDetailRespDto_1 = null;
//步骤0: D3查询租户节假日设置详情 - queryTenantHolidaySetDetail
        QueryTenantHolidaySetDetailRespDto queryTenantHolidaySetDetailRespDto = null;
        QueryTenantHolidaySetDetailReqDto queryTenantHolidaySetDetailReqDto = new QueryTenantHolidaySetDetailReqDto();
        if (reqDto != null) {
            queryTenantHolidaySetDetailReqDto.setHolidayStrategyId(reqDto.getHolidayStrategyId());//SimpleFieldAssign//sourceId:462885_1
        }

        /*D3查询租户节假日设置详情[5316]   */
        Assert.isNull(queryTenantHolidaySetDetailReqDto.getHolidayStrategyId(), "B3查询租户节假日设置详情(管理)-D3查询租户节假日设置详情-节假日设置策略ID不能为空", false);
        queryTenantHolidaySetDetailRespDto = fwAppCycleTypeClient.queryTenantHolidaySetDetail(queryTenantHolidaySetDetailReqDto).getData();


        queryTenantHolidaySetDetailRespDto_1 = queryTenantHolidaySetDetailRespDto;

        BffQueryTenantHolidaySetDetailRespDto retData = new BffQueryTenantHolidaySetDetailRespDto();
        if (queryTenantHolidaySetDetailRespDto_1 != null) {
            retData.setHolidayStrategyId(queryTenantHolidaySetDetailRespDto_1.getHolidayStrategyId());//SimpleFieldAssign//sourceId:462878_1
            retData.setHolidayCycleType(queryTenantHolidaySetDetailRespDto_1.getHolidayCycleType());//SimpleFieldAssign//sourceId:462879_1
            retData.setReportTimeHandlingStrategy(queryTenantHolidaySetDetailRespDto_1.getReportTimeHandlingStrategy());//SimpleFieldAssign//sourceId:462880_1
            retData.setSubjectLifeCycle(queryTenantHolidaySetDetailRespDto_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:462881_1
            retData.setOperationInductionId(queryTenantHolidaySetDetailRespDto_1.getOperationInductionId());//SimpleFieldAssign//sourceId:462882_1
            retData.setOperateTime(queryTenantHolidaySetDetailRespDto_1.getOperateTime());//SimpleFieldAssign//sourceId:462883_1
        }


        return retData;
    }

    /**
     * B3查询租户节假日菜单列表(管理)[5321]
     * gen by moon at 11/29/2022, 11:21:33 AM
     */
    @Trace(operationName = "B3查询租户节假日菜单列表(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTenantHolidayMenuListRespDto queryTenantHolidayMenuList(BffQueryTenantHolidayMenuListReqDto reqDto) {


        QueryTenantHolidayMenuListRespDto queryTenantHolidayMenuListRespDto_1 = null;
//步骤0: D3查询租户节假日菜单列表 - queryTenantHolidayMenuList
        QueryTenantHolidayMenuListRespDto queryTenantHolidayMenuListRespDto = null;
        QueryTenantHolidayMenuListReqDto queryTenantHolidayMenuListReqDto = new QueryTenantHolidayMenuListReqDto();


        /*D3查询租户节假日菜单列表[5318]   */

        queryTenantHolidayMenuListRespDto = fwAppCycleTypeClient.queryTenantHolidayMenuList(queryTenantHolidayMenuListReqDto).getData();


        queryTenantHolidayMenuListRespDto_1 = queryTenantHolidayMenuListRespDto;

        BffQueryTenantHolidayMenuListRespDto retData = new BffQueryTenantHolidayMenuListRespDto();
        if (queryTenantHolidayMenuListRespDto_1 != null) {
            retData.setTenantHolidayMenuList(queryTenantHolidayMenuListRespDto_1.getTenantHolidayMenuList().stream().map(item -> BeanUtil.toBean(item, BffTenantHolidayMenuDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:462959_1
        }


        return retData;
    }

    /**
     * B3新增租户节假日设置(管理)[5323]
     * gen by moon at 11/29/2022, 11:21:34 AM
     */
    @Trace(operationName = "B3新增租户节假日设置(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddTenantHolidaySetRespDto addTenantHolidaySet(BffAddTenantHolidaySetReqDto reqDto) {


        AddTenantHolidaySetRespDto addTenantHolidaySetRespDto_1 = null;
//步骤0: D2新增租户节假日设置 - addTenantHolidaySet
        AddTenantHolidaySetRespDto addTenantHolidaySetRespDto = null;
        AddTenantHolidaySetReqDto addTenantHolidaySetReqDto = new AddTenantHolidaySetReqDto();
        if (reqDto != null) {
            addTenantHolidaySetReqDto.setHolidayCycleType(reqDto.getHolidayCycleType());//SimpleFieldAssign//sourceId:462968_1
            addTenantHolidaySetReqDto.setReportTimeHandlingStrategy(reqDto.getReportTimeHandlingStrategy());//SimpleFieldAssign//sourceId:462969_1
            addTenantHolidaySetReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:462970_1
        }

        /*D2新增租户节假日设置[5322]   */
        Assert.isNull(addTenantHolidaySetReqDto.getHolidayCycleType(), "B3新增租户节假日设置(管理)-D2新增租户节假日设置-节假日周期类型不能为空", false);
        Assert.isNull(addTenantHolidaySetReqDto.getReportTimeHandlingStrategy(), "B3新增租户节假日设置(管理)-D2新增租户节假日设置-汇报时间处理策略不能为空", false);
        Assert.isNull(addTenantHolidaySetReqDto.getSubjectLifeCycle(), "B3新增租户节假日设置(管理)-D2新增租户节假日设置-主体生命周期不能为空", false);
        addTenantHolidaySetRespDto = fwAppCycleTypeClient.addTenantHolidaySet(addTenantHolidaySetReqDto).getData();


        addTenantHolidaySetRespDto_1 = addTenantHolidaySetRespDto;

        BffAddTenantHolidaySetRespDto retData = new BffAddTenantHolidaySetRespDto();
        if (addTenantHolidaySetRespDto_1 != null) {
            retData.setHolidayStrategyId(addTenantHolidaySetRespDto_1.getHolidayStrategyId());//SimpleFieldAssign//sourceId:462975_1
        }


        return retData;
    }

    /**
     * B3修改租户节假日设置(管理)[5329]
     * gen by moon at 11/29/2022, 11:21:35 AM
     */
    @Trace(operationName = "B3修改租户节假日设置(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateTenantHolidaySetRespDto updateTenantHolidaySet(BffUpdateTenantHolidaySetReqDto reqDto) {


        //步骤0: D3修改租户节假日设置 - updateTenantHolidaySet
        UpdateTenantHolidaySetRespDto updateTenantHolidaySetRespDto = null;
        UpdateTenantHolidaySetReqDto updateTenantHolidaySetReqDto = new UpdateTenantHolidaySetReqDto();
        if (reqDto != null) {
            updateTenantHolidaySetReqDto.setHolidayStrategyId(reqDto.getHolidayStrategyId());//SimpleFieldAssign//sourceId:462990_1
            updateTenantHolidaySetReqDto.setReportTimeHandlingStrategy(reqDto.getReportTimeHandlingStrategy());//SimpleFieldAssign//sourceId:462991_1
            updateTenantHolidaySetReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:462992_1
        }

        /*D3修改租户节假日设置[5326]   */
        Assert.isNull(updateTenantHolidaySetReqDto.getHolidayStrategyId(), "B3修改租户节假日设置(管理)-D3修改租户节假日设置-节假日设置策略ID不能为空", false);
        updateTenantHolidaySetRespDto = fwAppCycleTypeClient.updateTenantHolidaySet(updateTenantHolidaySetReqDto).getData();


        BffUpdateTenantHolidaySetRespDto retData = new BffUpdateTenantHolidaySetRespDto();


        return retData;
    }

    /**
     * B3删除租户节假日设置(管理)[5330]
     * gen by moon at 11/29/2022, 8:06:11 PM
     */
    @Trace(operationName = "B3删除租户节假日设置(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffDeleteTenantHolidaySetRespDto deleteTenantHolidaySet(BffDeleteTenantHolidaySetReqDto reqDto) {


        //步骤0: D3删除租户节假日设置 - deleteTenantHolidaySet
        DeleteTenantHolidaySetRespDto deleteTenantHolidaySetRespDto = null;
        DeleteTenantHolidaySetReqDto deleteTenantHolidaySetReqDto = new DeleteTenantHolidaySetReqDto();
        if (reqDto != null) {
            deleteTenantHolidaySetReqDto.setHolidayStrategyId(reqDto.getHolidayStrategyId());//SimpleFieldAssign//sourceId:462998_1
        }

        /*D3删除租户节假日设置[5327]   */
        Assert.isNull(deleteTenantHolidaySetReqDto.getHolidayStrategyId(), "B3删除租户节假日设置(管理)-D3删除租户节假日设置-节假日设置策略ID不能为空", false);
        deleteTenantHolidaySetRespDto = fwAppCycleTypeClient.deleteTenantHolidaySet(deleteTenantHolidaySetReqDto).getData();


        BffDeleteTenantHolidaySetRespDto retData = new BffDeleteTenantHolidaySetRespDto();


        return retData;
    }

    /**
     * B3存档租户节假日设置(管理)[5331]
     * gen by moon at 11/29/2022, 11:21:38 AM
     */
    @Trace(operationName = "B3存档租户节假日设置(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffArchiveTenantHolidaySetRespDto archiveTenantHolidaySet(BffArchiveTenantHolidaySetReqDto reqDto) {


        //步骤0: D3存档租户节假日设置 - archiveTenantHolidaySet
        ArchiveTenantHolidaySetRespDto archiveTenantHolidaySetRespDto = null;
        ArchiveTenantHolidaySetReqDto archiveTenantHolidaySetReqDto = new ArchiveTenantHolidaySetReqDto();
        if (reqDto != null) {
            archiveTenantHolidaySetReqDto.setHolidayStrategyId(reqDto.getHolidayStrategyId());//SimpleFieldAssign//sourceId:463005_1
        }

        /*D3存档租户节假日设置[5328]   */
        Assert.isNull(archiveTenantHolidaySetReqDto.getHolidayStrategyId(), "B3存档租户节假日设置(管理)-D3存档租户节假日设置-节假日设置策略ID不能为空", false);
        archiveTenantHolidaySetRespDto = fwAppCycleTypeClient.archiveTenantHolidaySet(archiveTenantHolidaySetReqDto).getData();


        BffArchiveTenantHolidaySetRespDto retData = new BffArchiveTenantHolidaySetRespDto();


        return retData;
    }

    /**
     * B3查询周期详情(管理)[5289]
     * gen by moon at 11/29/2022, 8:06:10 PM
     */
    @Trace(operationName = "B3查询周期详情(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleDetailRespDto queryCycleDetail(BffQueryCycleDetailReqDto reqDto) {


        QueryCycleDetailComRespDto queryCycleDetailComRespDto_1 = null;
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 = null;
//步骤0: D3-4查询周期详情(公共) - queryCycleDetailCom
        QueryCycleDetailComRespDto queryCycleDetailComRespDto = null;
        QueryCycleDetailComReqDto queryCycleDetailComReqDto = new QueryCycleDetailComReqDto();
        queryCycleDetailComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:457689_1
        if (reqDto != null) {
            queryCycleDetailComReqDto.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:457672_1
            queryCycleDetailComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:459001_1
        }

        /*D3-4查询周期详情(公共)[2009]   */
        Assert.isNull(queryCycleDetailComReqDto.getCycleId(), "B3查询周期详情(管理)-D3-4查询周期详情(公共)-周期ID不能为空", false);
        Assert.isNull(queryCycleDetailComReqDto.getSubjectLifeCycle(), "B3查询周期详情(管理)-D3-4查询周期详情(公共)-主体生命周期不能为空", false);
        Assert.isNull(queryCycleDetailComReqDto.getSpaceId(), "B3查询周期详情(管理)-D3-4查询周期详情(公共)-创建于空间ID不能为空", false);
        queryCycleDetailComRespDto = fwAppCycleTypeClient.queryCycleDetailCom(queryCycleDetailComReqDto).getData();
        Assert.isTrue(queryCycleDetailComRespDto == null || queryCycleDetailComRespDto.getCycleId() == null, "找不到数据，系统异常", false);

        queryCycleDetailComRespDto_1 = queryCycleDetailComRespDto;

//步骤1: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
        if (queryCycleDetailComRespDto != null) {
            QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto = new QueryInductionRecordInfoDetailComReqDto();
            queryInductionRecordInfoDetailComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:457711_1
            if (queryCycleDetailComRespDto != null) {
                queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryCycleDetailComRespDto.getOperationInductionId());//SimpleFieldAssign//sourceId:457703_1
            }

            /*D1-3查询个人就职记录信息详情（公共）[715]   */
            Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(), "B3查询周期详情(管理)-D1-3查询个人就职记录信息详情（公共）-就职记录ID不能为空", false);
            Assert.isNull(queryInductionRecordInfoDetailComReqDto.getSpaceId(), "B3查询周期详情(管理)-D1-3查询个人就职记录信息详情（公共）-创建于空间ID不能为空", false);
            queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData();


            queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
        }

        BffQueryCycleDetailRespDto retData = new BffQueryCycleDetailRespDto();
        if (queryCycleDetailComRespDto_1 != null) {
            retData.setCycleId(queryCycleDetailComRespDto_1.getCycleId());//SimpleFieldAssign//sourceId:457715_1
            retData.setCycleStandardName(queryCycleDetailComRespDto_1.getCycleStandardName());//SimpleFieldAssign//sourceId:457716_1
            retData.setCycleStartTime(queryCycleDetailComRespDto_1.getCycleStartTime());//SimpleFieldAssign//sourceId:457717_1
            retData.setCycleEndTime(queryCycleDetailComRespDto_1.getCycleEndTime());//SimpleFieldAssign//sourceId:457718_1
            retData.setCycleTypeCode(queryCycleDetailComRespDto_1.getCycleTypeCode());//SimpleFieldAssign//sourceId:457719_1
            retData.setCycleTypeName(queryCycleDetailComRespDto_1.getCycleTypeName());//SimpleFieldAssign//sourceId:457720_1
            retData.setSubjectLifeCycle(queryCycleDetailComRespDto_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:457721_1
            retData.setOperationInductionId(queryCycleDetailComRespDto_1.getOperationInductionId());//SimpleFieldAssign//sourceId:457722_1
            retData.setOperateTime(queryCycleDetailComRespDto_1.getOperateTime());//SimpleFieldAssign//sourceId:457723_1
        }
        if (queryInductionRecordInfoDetailComRespDto_1 != null) {
            retData.setUserId(queryInductionRecordInfoDetailComRespDto_1.getUserId());//SimpleFieldAssign//sourceId:457724_1
            retData.setUserFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:457727_1
            retData.setIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:457725_1
            retData.setNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//SimpleFieldAssign//sourceId:457726_1
        }


        return retData;
    }

    /**
     * B3查询租户周期类型实例列表(管理)[5335]
     * gen by moon at 11/29/2022, 8:06:13 PM
     */
    @Trace(operationName = "B3查询租户周期类型实例列表(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTenantCycleTypeInstanceListRespDto queryTenantCycleTypeInstanceList(BffQueryTenantCycleTypeInstanceListReqDto reqDto) {


        QueryTenantCycleTypeInstanceListRespDto queryTenantCycleTypeInstanceListRespDto_1 = null;
//步骤0: D3查询租户周期类型实例列表 - queryTenantCycleTypeInstanceList
        QueryTenantCycleTypeInstanceListRespDto queryTenantCycleTypeInstanceListRespDto = null;
        QueryTenantCycleTypeInstanceListReqDto queryTenantCycleTypeInstanceListReqDto = new QueryTenantCycleTypeInstanceListReqDto();
        queryTenantCycleTypeInstanceListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:463504_1
        if (reqDto != null) {
            queryTenantCycleTypeInstanceListReqDto.setCycleTypeId(reqDto.getCycleTypeId());//SimpleFieldAssign//sourceId:463503_1
        }

        /*D3查询租户周期类型实例列表[5334]   */
        Assert.isNull(queryTenantCycleTypeInstanceListReqDto.getCycleTypeId(), "B3查询租户周期类型实例列表(管理)-D3查询租户周期类型实例列表-周期类型ID不能为空", false);
        Assert.isNull(queryTenantCycleTypeInstanceListReqDto.getSubjectLifeCycle(), "B3查询租户周期类型实例列表(管理)-D3查询租户周期类型实例列表-主体生命周期不能为空", false);
        queryTenantCycleTypeInstanceListRespDto = fwAppCycleTypeClient.queryTenantCycleTypeInstanceList(queryTenantCycleTypeInstanceListReqDto).getData();


        queryTenantCycleTypeInstanceListRespDto_1 = queryTenantCycleTypeInstanceListRespDto;

        BffQueryTenantCycleTypeInstanceListRespDto retData = new BffQueryTenantCycleTypeInstanceListRespDto();
        if (queryTenantCycleTypeInstanceListRespDto_1 != null) {
            retData.setTenantCycleTypeInstanceList(queryTenantCycleTypeInstanceListRespDto_1.getTenantCycleTypeInstanceList().stream().map(item -> BeanUtil.toBean(item, BffTenantCycleTypeInstanceDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:463507_1
        }


        return retData;
    }

    /**
     * B3新增租户周期(管理)[5293]
     * gen by moon at 12/5/2022, 5:37:57 PM
     */
    @Trace(operationName = "B3新增租户周期(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddTenantCycleRespDto addTenantCycle(BffAddTenantCycleReqDto reqDto) {


        AddSpaceCycleComRespDto addSpaceCycleComRespDto_1 = null;
//步骤0: D3新增租户周期(公共) - addSpaceCycleCom
        AddSpaceCycleComRespDto addSpaceCycleComRespDto = null;
        AddSpaceCycleComReqDto addSpaceCycleComReqDto = new AddSpaceCycleComReqDto();
        if (reqDto != null) {
            addSpaceCycleComReqDto.setCycleStandardName(reqDto.getCycleStandardName());//SimpleFieldAssign//sourceId:483962_1
            addSpaceCycleComReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:483963_1
            addSpaceCycleComReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:483964_1
            addSpaceCycleComReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:483965_1
            addSpaceCycleComReqDto.setCycleTypeName(reqDto.getCycleTypeName());//SimpleFieldAssign//sourceId:483966_1
            addSpaceCycleComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:483967_1
        }

        /*D3新增租户周期(公共)[5385]   */
        Assert.isNull(addSpaceCycleComReqDto.getCycleStandardName(), "B3新增租户周期(管理)-D3新增租户周期(公共)-周期名称不能为空", false);
        Assert.isNull(addSpaceCycleComReqDto.getCycleStartTime(), "B3新增租户周期(管理)-D3新增租户周期(公共)-周期开始时间不能为空", false);
        Assert.isNull(addSpaceCycleComReqDto.getCycleEndTime(), "B3新增租户周期(管理)-D3新增租户周期(公共)-周期结束时间不能为空", false);
        Assert.isNull(addSpaceCycleComReqDto.getCycleTypeCode(), "B3新增租户周期(管理)-D3新增租户周期(公共)-周期类型标识不能为空", false);
        Assert.isNull(addSpaceCycleComReqDto.getCycleTypeName(), "B3新增租户周期(管理)-D3新增租户周期(公共)-周期类型名称不能为空", false);
        Assert.isNull(addSpaceCycleComReqDto.getSubjectLifeCycle(), "B3新增租户周期(管理)-D3新增租户周期(公共)-主体生命周期不能为空", false);
        addSpaceCycleComRespDto = fwAppCycleTypeClient.addSpaceCycleCom(addSpaceCycleComReqDto).getData();


        addSpaceCycleComRespDto_1 = addSpaceCycleComRespDto;

        BffAddTenantCycleRespDto retData = new BffAddTenantCycleRespDto();
        if (addSpaceCycleComRespDto_1 != null) {
            retData.setCycleId(addSpaceCycleComRespDto_1.getCycleId());//SimpleFieldAssign//sourceId:483977_1
        }


        return retData;
    }

    /**
     * B3查询租户周期类型列表ByCodes(管理)[5292]
     * gen by moon at 2/27/2023, 4:08:38 PM
     */
    @Trace(operationName = "B3查询租户周期类型列表ByCodes(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchQueryTenantCycleTypeListByCodesRespDto batchQueryTenantCycleTypeListByCodes(BffBatchQueryTenantCycleTypeListByCodesReqDto reqDto) {


        QueryTenantCycleTypeListRespDto queryTenantCycleTypeListRespDto_1 = null;
//步骤0: D3查询租户周期类型列表 - queryTenantCycleTypeList
        QueryTenantCycleTypeListRespDto queryTenantCycleTypeListRespDto = null;
        QueryTenantCycleTypeListReqDto queryTenantCycleTypeListReqDto = new QueryTenantCycleTypeListReqDto();
        if (reqDto != null) {
            queryTenantCycleTypeListReqDto.setComTxtField(reqDto.getTenantCycleNavigationValue());//SimpleFieldAssign//sourceId:458460_1
        }

        /*D3查询租户周期类型列表[5290]   */
        Assert.isNull(queryTenantCycleTypeListReqDto.getComTxtField(), "B3查询租户周期类型列表ByCodes(管理)-D3查询租户周期类型列表-通用文本字段不能为空", false);
        queryTenantCycleTypeListRespDto = fwAppCycleTypeClient.queryTenantCycleTypeList(queryTenantCycleTypeListReqDto).getData();


        queryTenantCycleTypeListRespDto_1 = queryTenantCycleTypeListRespDto;

        BffBatchQueryTenantCycleTypeListByCodesRespDto retData = new BffBatchQueryTenantCycleTypeListByCodesRespDto();
        if (queryTenantCycleTypeListRespDto_1 != null) {
            retData.setTenantCycleTypeList(queryTenantCycleTypeListRespDto_1.getTenantCycleTypeList().stream().map(item -> BeanUtil.toBean(item, BffTenantCycleTypeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:458463_1
        }


        return retData;
    }

    /**
     * B3修改租户周期(管理)[5294]
     * gen by moon at 2/27/2023, 3:58:24 PM
     */
    @Trace(operationName = "B3修改租户周期(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateTenantCycleRespDto updateTenantCycle(BffUpdateTenantCycleReqDto reqDto) {


        //步骤0: D3修改租户周期(公共) - updateTenantCycleCom
        UpdateTenantCycleComRespDto updateTenantCycleComRespDto = null;
        UpdateTenantCycleComReqDto updateTenantCycleComReqDto = new UpdateTenantCycleComReqDto();
        if (reqDto != null) {
            updateTenantCycleComReqDto.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:484168_1
            updateTenantCycleComReqDto.setCycleStandardName(reqDto.getCycleStandardName());//SimpleFieldAssign//sourceId:484169_1
            updateTenantCycleComReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:484170_1
            updateTenantCycleComReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:484171_1
            updateTenantCycleComReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:484172_1
            updateTenantCycleComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:484174_1
        }

        /*D3修改租户周期(公共)[5387]   */
        Assert.isNull(updateTenantCycleComReqDto.getCycleId(), "B3修改租户周期(管理)-D3修改租户周期(公共)-周期ID不能为空", false);
        updateTenantCycleComRespDto = fwAppCycleTypeClient.updateTenantCycleCom(updateTenantCycleComReqDto).getData();


        BffUpdateTenantCycleRespDto retData = new BffUpdateTenantCycleRespDto();


        return retData;
    }

}
